<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main"/>
		<title>FishCms</title>

	</head>
	<body>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">
               最新文章
            </h3>
        </div>
        <div class="panel-body">
            <g:each in="${latest}" var="article">
                <g:link controller="post" action="show" params="[id:article.id]">${article.title}</g:link><p/>
            </g:each>
        </div>
    </div>


    <g:each in="${categories}" var="category">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <g:link controller="post" action="list" params="[category:category.id]" >${category.name}</g:link>
                </h3>
            </div>
            <div class="panel-body">
                <g:each in="${category.findAllArticle([max:3,offset:0])}" var="article">
                    <g:link controller="post" action="show" params="[id:article.id]">${article.title}</g:link><p/>
                </g:each>
            </div>
        </div>
    </g:each>


	</body>
</html>
